/**
 * 
 */
package cn.zhucongqi;

import com.jfinal.ext2.core.ControllerExt;
import com.jfinal.ext2.upload.filerenamepolicy.CustomParentDirFileRenamePolicy;
import com.jfinal.ext2.upload.filerenamepolicy.NamePolicy;
import com.jfinal.upload.UploadFile;

/**
 * @author BruceZCQ
 * Jun 22, 20154:55:18 PM
 */
public class UploadController extends ControllerExt {

	public void index(){
		UploadFile file = this.getFile("img", new CustomParentDirFileRenamePolicy("BruceZCQ",NamePolicy.ORIGINAL_NAME));
		this.renderText(file.getOriginalFileName()+"path=>"+file.getFile().getAbsolutePath());
	}
	
}
